<?php
require_once("./DButil.php");

$sql="select v.videoId,v.videoInfo,c.courseName,t.teacherName,v.status
from t_video v
left join t_teacher t on v.teacherId=t.teacherId
left join t_course c on v.courseId=c.courseId
";

if (query($sql)) {
    $result=query($sql);
}else{
    $result = [
        "msg" => "未存在",
        "code" => 404,
        "success" => false,
    ];
}

header("Content-Type:application/json;charset=utf-8");
echo json_encode($result);
?>